import { Navigate } from 'react-router-dom';
// 权限路由，路由守卫
function Private(props: any) {
	if (localStorage.getItem('token')) {
		return <>{props.children}</>;
	} else {
		// 没有登录有跳转登录
		return <Navigate to="/user/login" />;
	}
}

export default Private;
